﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />	<title>电子政务平台----调控监测</title>	<link media="all" rel="stylesheet" type="text/css" href="css/all.css" />    <script src="../../../Script/jquery-1.7.1.min.js" type="text/javascript"></script>	<script type="text/javascript" src="js/jquery.main.js"></script>	<!--[if lt IE 9]><link rel="stylesheet" type="text/css" href="css/ie.css" /><![endif]-->    <script type="text/javascript">
        function MenuBind() {
            $.ajax({
                url: "../../../ButtonConfigInfo/ButtonInfo.ashx?t=" + new Date().getDate().toString(),
                dataType: "text",
                type: "post",
                data: { stype: "getMenu", ShowUrl: "true", MenuTop: "true", ShowIcon: "true" },
                success: function (data) {
                    var dataJson = window.eval("(" + data + ")");
                    if (dataJson.state) {
                        $("#msgContent").html("");
                        var setting = {};
                        var zNodes = dataJson.rows;
                        for (var i = 0; i < zNodes.length; i++) {
                            var menuChild = $("<li>").attr("id", zNodes[i].OID);
                            var title= $("<a>").addClass("ico" + (i + 1)).html("<span>" + zNodes[i].name + "</span><em></em>");
                            title.bind("click", function () {
                                $(this).parent().parent().children().removeClass("active");
                                $(this).parent().addClass("active");
                                var TreeID = $(this).parent().attr("id");
                                MenuClick(TreeID, $("#MenuTree2"));
                            });
                            var content = $("<span>").addClass("tooltip").html("<span>" + zNodes[i].name + "</span>");
                            menuChild.append(title);
                            menuChild.append(content);
                            $("#msgContent").append(menuChild);
                            $(".MenuContent").hide();
                        }
                        $("#msgContent").children().eq(0).children().eq(0).click();
                    }
                },
                error: function (i) {
                    alert("出现异常，请刷新再试！");
                }
            });
        }

        //菜单树加载
        function MenuClick(TreeNode, ulTree) {
            $.ajax({
                url: "../../../ButtonConfigInfo/ButtonInfo.ashx?t=" + new Date().getDate().toString(),
                dataType: "text",
                type: "post",
                data: { stype: "getMenu2", ShowUrl: "true", TreeID: TreeNode },
                success: function (data) {
                    var dataJson = window.eval("(" + data + ")");
                    if (dataJson.state) {
                        var setting = {};
                        var zNodes = dataJson.rows;
                        ulTree.html('');
                        for (var i = 0; i < zNodes[0].children.length; i++) {
                            var liItem = zNodes[0].children[i];
                            //<li><a href="#" class="ico1">Messages <span class="num">26</span></a></li>
                            var li = $("<li><a href='" + liItem.url + "'  class='ico" + (i + 1) + "' target='" + liItem.target + "'>" + liItem.name + "</a></li>");
                            ulTree.append(li);
                        }
                    }
                },
                error: function (i) {
                    alert("出现异常，请刷新再试！");
                }
            });
        }
        var mapNum = 0;
        function MoveMap(opener) {
            $(".MapOpen").hide();
            $(".MapOpenMax").show();
            $(".MapClose").show();
            switch (mapNum) {
                case 0:
                    if (opener == 1) {
                        mapNum++;
                    }
                    break;
                case 1:
                    if (opener == 1) {
                        mapNum++;
                    } else {
                        mapNum--;
                        $(".MapOpen").show();
                        $(".MapOpenMax").hide();
                        $(".MapClose").hide();
                    }
                    break;
                case 2:
                    if (opener == -1) {
                        mapNum--;
                    }
                    break;
                default:
                    break;
            }
            var WinWidth = $("#wrapper").width() - $("#sidebar").width() - 2;
            var tabsWidth = WinWidth * ((2 - mapNum) / 2);
            $(".tabs").animate({ width: tabsWidth + 'px' }, "slow");
            $("#Map").animate({ width: (WinWidth-tabsWidth) + 'px' }, "slow");
        }
        $(function () {
            //菜单树加载
            MenuBind();
            $(window).resize(function () {
                $("#wrapper").height((document.documentElement.clientHeight || document.body.clientHeight)).width((document.documentElement.clientWidth || document.body.clientWidth));
                $("#wrapper").css("minWidth", 960);
                var cHeight = $("#wrapper").height() - $("#header").height() - 5;
                $('#DemoContext,#Map').height(cHeight - 20);
                var WinWidth = $("#wrapper").width() - $("#sidebar").width() - 2;
                var tabsWidth = WinWidth * ((2 - mapNum) / 2);
                $(".tabs").width(tabsWidth);
                $("#Map").width(WinWidth - tabsWidth);
            });
            $(window).resize();
        });
</script></head><body>	<div id="wrapper">		<div id="content">			<div class="c1">				<div id="header" class="controls">					<nav class="links">
						<ul id="MenuTree2">						</ul>
					</nav>                    <div class="title">电子政务平台----调控监测</div>					<div class="profile-box">						<span class="profile">							<a href="#" class="section">								<img class="image" src="images/img1.png" alt="image description" width="26" height="26" />								<span class="text-box">									欢迎您									<strong class="name">admin</strong>								</span>							</a>							<a href="#" class="opener">opener</a>						</span>						<a href="#" class="btn-on">On</a>					</div>				</div>				<div class="tabs">                    <iframe frameborder="0" id="DemoContext" width="100%" name="DemoContext" src="tab/tab.aspx" scrolling="no"></iframe>				</div>                <div id="Map" style="width:0px;">                    <img id="imgMap" src="images/map.jpg" style="height:100%; width:100%;" />                </div>			</div>            <div id="tabMap">                    <div class="MapOpen" title="展开地图" onclick="MoveMap(1)"></div>                    <div class="MapOpenMax" title="放大" onclick="MoveMap(1)"></div>                    <div class="MapClose" title="收缩" onclick="MoveMap(-1)"></div>                </div>		</div>		<aside id="sidebar">			<strong class="logo"><a href="#">lg</a></strong>			<ul id="msgContent" class="tabset buttons">			</ul>			<span class="shadow"></span>		</aside>	</div></body></html>